package com.youan.pangu.plus.validate;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = NotRepeatConstraintValidator.class)
public @interface NotRepeat {

    String message() default "存在重复值";
    Class<? extends BaseMapper> mapperClass();
    Class entityClass();
    String columnName();

    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
